<tagLib name="html" />

<include file="Public:header" />

<div class="container" id="cpcontainer">
    <div class="itemtitle">
        <h3>{$Think.lang.manage_question}</h3>
        <ul class="tab1">
            <li><a href="__URL__/searchQuestion"><span>{$Think.lang.search_question}</span></a></li>
            <li class="current"><a href="__URL__/questionList"><span>{$Think.lang.all_question}</span></a></li>
        </ul>
    </div>
    <form name="cpform" method="post" action="__URL__/manageQuestion" id="cpform">
    <input type="hidden" name="op" value="confirm" />
    <table class="tb tb2 fixpadding tablesorter" id="myTable">
        <thead>
        <tr>
            <th>{$Think.lang.question_title}</th>
            <th>{$Think.lang.question_asker}</th>
            <th>{$Think.lang.question_answer_count}</th>
            <th>{$Think.lang.question_view_count}</th>
            <th>{$Think.lang.question_status}</th>
            <th>{$Think.lang.question_locked}</th>
            <th>{$Think.lang.question_submit_date}</th>
            <th width="10%">{$Think.lang.mark}</th>
        </tr>
        </thead>
        <tbody>
        <notempty name="questionList">
        <volist name="questionList" id="vo">
        <tr class="item">
            <td>{$vo.category_id|get_category_path}<br/><a href="{$vo.question_id|format_question_url=$vo['title']}" title="{$vo.title}" target="_blank">{$vo.title|kg_substr=0,45}</a></td>
            <td><a href="{$vo.poster_id|format_user_url=$vo['poster_name']}" target="_blank">{$vo.poster_name}</a></td>
            <td>{$vo.answer_count}</td>
            <td>{$vo.view_count}</td>
            <td>{$vo.status|get_question_status}</td>
            <td><eq name="vo.is_locked" value="1">{$Think.lang.yes}<else/>{$Think.lang.no}</eq></td>
            <td>{$vo.create_time|format_date}</td>
            <td><input type="checkbox" class="checkbox" name="mods[]" value="{$vo.question_id}" /></td>
        </tr>
        </volist>
        <else/>
        <tr><td colspan="8" align="center">{$Think.lang.no_record}</td><tr>
        </notempty>
        <tbody>
        <tr class="nobg">
            <td colspan="7">
                <div class="fixsel right">
                    <input type="submit" class="btn" name="action[delete]" value="{$think.lang.delete_selected}" />&nbsp;
                    <input type="submit" class="btn" name="action[move]" value="{$think.lang.move_selected}" />&nbsp;
                    <input type="submit" class="btn" name="action[lock]" value="{$think.lang.lock_selected}" />&nbsp;
                </div>
            </td>
            <td><input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll('prefix', this.form, 'mods')" /><label for="chkall">{$Think.lang.check_all}</label></td>
        </tr>
        <tr class="nobg">
            <td colspan="8"><div class="cuspages right"><div class="pages">{$pagination}</div></div></td>
        </tr>
    </table>
    </form>
</div>

<script type="text/javascript">
$(function(){
    $("#myTable").tablesorter({
        headers:{
            7:{sorter:false}
        }
    });
});
</script>

<include file="Public:footer" />
